@import '~styles/vars';
@import '~styles/extendables';
@import '~styles/mixins';

.filter-canvas {
  @extend %video-cover;
}

.camera {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;

  .video-stream {
    @extend %video-cover;

    &.hide {
      display: none;
    }
  }

  .not-supported {
    @extend %center-x-y;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    color: $color-white;
    padding: 0 50px;

    p {
      font-style: italic;
      font-size: 23px;
      text-shadow: 0 0 3px $color-black;
      margin-top: -100px;
      line-height: 30px;

      span {
        font-style: normal;
      }
    }
  }

  .open-mouth {
    position: absolute;
    top: 135px;
    right: 5%;
    color: $color-white;
    font-size: 20px;
    text-align: center;
    transform: rotate(10deg);
    z-index: 1;
    background: rgba($color-black, 0.2);
    padding: 10px 35px 5px;
    border-radius: 50px;
    box-shadow: 0 0 1px $color-black;

    strong {
      display: block;
      font-style: italic;
      text-shadow: 0 0 2px $color-black;
    }
  }

  .controls {
    @extend %app-width;
    position: fixed;
    bottom: 0;
    height: 240px;
    overflow: hidden;

    .btn-capture,
    .btn-filters {
      position: absolute;
      top: 50%;
      left: 50%;

      .icon {
        @include icon-shadow($color-grey-shade-0, 2px);
        border-radius: 100%;
      }
    }

    .btn-capture {
      margin: -35px 0 0 -35px;
      border-radius: 100%;

      .icon {
        font-size: 70px;
      }
    }

    .btn-filters {
      font-size: 25px;
      margin: -12.5px 0 0 50px;
    }

    .filters {
      @extend %center-x-y;
      margin: 93px 0 20px;

      .btn {
        @extend %center-x-y;
        margin: 0 6px;
        width: 50px;
        height: 50px;
        border: 3px solid $color-white;
        border-radius: 100%;

        svg {
          width: 30px;
        }

        &.dog {
          background: $color-pastel-pink;
        }
        &.halloween {
          background: $color-pastel-blue;
        }
        &.deform {
          background: $color-pastel-green;
        }
        &.bees {
          background: $color-pastel-yellow;
        }
        &.liberty {
          background: $color-pastel-blue;
        }

        // Center button
        &:nth-child(3) {
          width: 54px;
          height: 54px;
          margin: 0 15px;
          border: 0;
          border: 1px solid $color-black;

          svg {
            width: 40px;
          }
        }
      }
    }

    .filter-actions {
      z-index: 100;
      display: flex;
      justify-content: center;

      .icon {
        font-size: 22px;
      }

      .btn {
        margin: 0 10px;

        &.btn-close {
          @include highlight(35px, 35px);
          margin: 0 25px;
        }
      }
    }
  }
}
